import { reactive } from "vue";
import { DialogModel } from "@/type/BaseType";
export default function useDialog() {
  const dialog = reactive<DialogModel>({
    title: '新增组织',
    height: 280,
    width: 630,
    visible: false
  })
  const onShow = () => {
    dialog.visible = true
  }
  //弹框关闭
  const onClose = () => {
    dialog.visible = false
  }
  //弹框确定
  const onConfirm = () => {
    dialog.visible = false
  }

  return {
    dialog,
    onShow,
    onClose,
    onConfirm
  }
}